
namespace Com.ContentRendering.Api.DataEngine.Handler.Child
{
    /// <summary/>
    internal class NullChildHandler : AbstractChildHandler
    {
        /// <summary/>
        internal NullChildHandler(
            ReflectionCache reflectionCache,
            object data,
            string name)
            : base(
            reflectionCache,
            data,
            name) {}

        /// <summary/>
        internal override object Invoke()
        {
            // is the value not null
            if (base._data != null)
            {
                return base._successor.Invoke();
            }

            return null;
        }
    }
}
